package com.cu.employmentmanagementsystem.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

@Data
@ApiModel(description = "学生信息模型")
public class StudentInformation {

  @ApiModelProperty(value = "学生ID", example = "1")
  private Long id; // 使用Long而不是long以允许null值

  @ApiModelProperty(value = "学生姓名", required = true, example = "张三")
  private String name;

  @ApiModelProperty(value = "学校名称", required = true, example = "清华大学")
  private String school;

  @ApiModelProperty(value = "性别（0: 女, 1: 男）", example = "0")
  private Integer gender; // 使用Integer而不是long，并使用0和1表示性别

  @ApiModelProperty(value = "联系电话", example = "13800138000")
  private String tel;

  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  @ApiModelProperty(value = "生日", example = "2000-01-01T00:00:00")
  private LocalDateTime birthday;

  @ApiModelProperty(value = "家庭地址", example = "北京市朝阳区")
  private String homeAddress;

  @ApiModelProperty(value = "用户ID（关联到用户实体）", example = "123")
  private Long userId; // 使用Long而不是long以允许null值
}